<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>姓名案例_插值语法实现</title>
		<script src="./js/vue.js"></script>
	</head>
	<body>
		<div id="root">
			<input type="text" v-model="firstName" /><br />
			<input type="text" v-model="lastName" /><br />
			姓名:<span>{{fullName()}}</span><br />
			姓名:<span>{{fullName()}}</span><br />
			姓名:<span>{{fullName()}}</span><br />
		</div>
		<script>
			Vue.config.productionTip = false;
			const vm = new Vue({
				el:'#root',
				data:{
					firstName:'张',
					lastName:'三'
				},
				methods:{
					fullName(){
						console.log('=============');
						return this.firstName+'-'+this.lastName;
					}
				}
			});
		</script>
	</body>
</html>